{"ast":null,"code":"import * as React from 'react';\nimport SliderContext from '../context';\nimport Track from './Track';\nimport { getIndex } from '../util';\nexport default function Tracks(props) {\n  var prefixCls = props.prefixCls,\n    style = props.style,\n    values = props.values,\n    startPoint = props.startPoint,\n    onStartMove = props.onStartMove;\n  var _React$useContext = React.useContext(SliderContext),\n    included = _React$useContext.included,\n    range = _React$useContext.range,\n    min = _React$useContext.min;\n  var trackList = React.useMemo(function () {\n    if (!range) {\n      // null value do not have track\n      if (values.length === 0) {\n        return [];\n      }\n      var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;\n      var endValue = values[0];\n      return [{\n        start: Math.min(startValue, endValue),\n        end: Math.max(startValue, endValue)\n      }];\n    } // Multiple\n\n    var list = [];\n    for (var i = 0; i < values.length - 1; i += 1) {\n      list.push({\n        start: values[i],\n        end: values[i + 1]\n      });\n    }\n    return list;\n  }, [values, range, startPoint, min]);\n  return included ? trackList.map(function (_ref, index) {\n    var start = _ref.start,\n      end = _ref.end;\n    return /*#__PURE__*/React.createElement(Track, {\n      index: index,\n      prefixCls: prefixCls,\n      style: getIndex(style, index),\n      start: start,\n      end: end,\n      key: index,\n      onStartMove: onStartMove\n    });\n  }) : null;\n}","map":{"version":3,"names":["React","SliderContext","Track","getIndex","Tracks","props","prefixCls","style","values","startPoint","onStartMove","_React$useContext","useContext","included","range","min","trackList","useMemo","length","startValue","endValue","start","Math","end","max","list","i","push","map","_ref","index","createElement","key"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-slider/es/Tracks/index.js"],"sourcesContent":["import * as React from 'react';\nimport SliderContext from '../context';\nimport Track from './Track';\nimport { getIndex } from '../util';\nexport default function Tracks(props) {\n  var prefixCls = props.prefixCls,\n      style = props.style,\n      values = props.values,\n      startPoint = props.startPoint,\n      onStartMove = props.onStartMove;\n\n  var _React$useContext = React.useContext(SliderContext),\n      included = _React$useContext.included,\n      range = _React$useContext.range,\n      min = _React$useContext.min;\n\n  var trackList = React.useMemo(function () {\n    if (!range) {\n      // null value do not have track\n      if (values.length === 0) {\n        return [];\n      }\n\n      var startValue = startPoint !== null && startPoint !== void 0 ? startPoint : min;\n      var endValue = values[0];\n      return [{\n        start: Math.min(startValue, endValue),\n        end: Math.max(startValue, endValue)\n      }];\n    } // Multiple\n\n\n    var list = [];\n\n    for (var i = 0; i < values.length - 1; i += 1) {\n      list.push({\n        start: values[i],\n        end: values[i + 1]\n      });\n    }\n\n    return list;\n  }, [values, range, startPoint, min]);\n  return included ? trackList.map(function (_ref, index) {\n    var start = _ref.start,\n        end = _ref.end;\n    return /*#__PURE__*/React.createElement(Track, {\n      index: index,\n      prefixCls: prefixCls,\n      style: getIndex(style, index),\n      start: start,\n      end: end,\n      key: index,\n      onStartMove: onStartMove\n    });\n  }) : null;\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,YAAY;AACtC,OAAOC,KAAK,MAAM,SAAS;AAC3B,SAASC,QAAQ,QAAQ,SAAS;AAClC,eAAe,SAASC,MAAM,CAACC,KAAK,EAAE;EACpC,IAAIC,SAAS,GAAGD,KAAK,CAACC,SAAS;IAC3BC,KAAK,GAAGF,KAAK,CAACE,KAAK;IACnBC,MAAM,GAAGH,KAAK,CAACG,MAAM;IACrBC,UAAU,GAAGJ,KAAK,CAACI,UAAU;IAC7BC,WAAW,GAAGL,KAAK,CAACK,WAAW;EAEnC,IAAIC,iBAAiB,GAAGX,KAAK,CAACY,UAAU,CAACX,aAAa,CAAC;IACnDY,QAAQ,GAAGF,iBAAiB,CAACE,QAAQ;IACrCC,KAAK,GAAGH,iBAAiB,CAACG,KAAK;IAC/BC,GAAG,GAAGJ,iBAAiB,CAACI,GAAG;EAE/B,IAAIC,SAAS,GAAGhB,KAAK,CAACiB,OAAO,CAAC,YAAY;IACxC,IAAI,CAACH,KAAK,EAAE;MACV;MACA,IAAIN,MAAM,CAACU,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,EAAE;MAC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